<!--{include(file='head.html')}-->
<script type="text/javascript" src="template/jslib/upload/ajaxupload.js"></script>
<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<div id="main_c" >
			<form name="seaform" id="seaform" action="" method="post">
				<div class="bt_bk">
					<span class="btn">
						<a href="javascript:void(0);" onclick="$.oper.refresh();return false;">刷新</a>
						<a href="javascript:void(0);" onclick="$.oper.cdelete();return false;">删除</a>
					</span>
					<div id="buttonholder" style="margin-left:20px;"></div>
				</div>
				<input type="hidden" value="<!--{def($pagearr['page'],1)}-->"		name="page" id="page"/>
				<input type="hidden" value="<!--{def($pagearr['pagesize'],10)}-->"	name="pagesize" id="pagesize" />
			</form>
			<!--{include_page("page.html","top")}-->
			<table class="tableStyle" border="0" cellspacing="0" cellpadding="0">
				<thead>
					<tr align="center">
						<th width="10%"><input type="checkbox" value="1" name="allselect" id="allselect" autocomplete="off"/></th>
						<th width="10%">操作</th>
						<th width="40%">图片</th>
						<th width="40%">添加时间</th>
					</tr>
				</thead>
				<tbody id="listtbody">
					<!--{foreach $piclist pic}-->
					<tr align="center" id="tr_<!--{$pic.picid}-->">
						<td>
							<input type="checkbox" value="<!--{$pic.picid}-->" name="singleselect" autocomplete="off"/>
						</td>
						<td>
							<a href="javascript:void(0);" onclick="$.oper.cdelete('<!--{$pic.picid}-->');return false;" class="del"></a>
						</td>
						<td>
							<img src="<!--{$pic.pic}-->" width="30" height="30" />
						</td>
						<td>
							<!--{if $pic['addtime']}-->
								<!--{date('m月d日',$pic['addtime'])}-->
							<!--{else}-->
								--
							<!--{/if}-->
						</td>
					</tr>
					<!--{/foreach}-->
				</tbody>
			</table>
			<!--{include_page("page.html","foot")}-->
		</div>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
function onComplete(id, fileName, serverData) {
	data = serverData;
	if(data.err) {
		jAlert(data.err);
	} else {
		var img = data.msg,picid = data.picid;
		var html = "<tr id='tr_"+picid+"' align=\"center\">"
				 + "<td><input type=\"checkbox\" value=\""+picid+"\" name=\"singleselect\" autocomplete=\"off\"/></td>"
				 + "<td><a href=\"javascript:void(0);\" onclick=\"$.oper.cdelete('"+picid+"');return false;\" class=\"del\"></a></td>"
				 + "<td><img src='"+img+"' width=\"30\" height=\"30\"/></td>"
				 + "<td>刚刚</td>"
				 + "</tr>"
				 ;
		$("#listtbody").prepend(html);
	}	
}
$(function(){
	$.oper.init("<!--{url('admin','spec','picsave')}-->");
	var uploader = new qq.FileUploader({action:"<!--{url('admin','uploadfile','spec')}-->"});
});

</script>